/**
 * 
 */
package ee.fujitsu.payments.strategy;

import ee.fujitsu.common.Price;
import ee.fujitsu.common.Type;
import ee.fujitsu.payments.PaymentStyle;

/**
 * The Class OldFilmPayment.
 *
 * @author Andrei
 * 
 * 05.09.2012
 */
public class OldFilmPayment  implements PaymentStyle{
	
	/* (non-Javadoc)
	 * @see ee.fujitsu.payments.PaymentStyle#getRegulapPayment(int)
	 */
	public double getRegulapPayment(int daysBefore) {
		if ( daysBefore > 0) 
			if (daysBefore <= Type.OLD_FILM.getDays()) 
				return Price.BASIC_PRICE.getPrice() ;
			else 
				return (daysBefore - Type.OLD_FILM.getDays()) * Price.BASIC_PRICE.getPrice() + Price.BASIC_PRICE.getPrice();
			else
				return 0;
	}
	
	/* (non-Javadoc)
	 * @see ee.fujitsu.payments.PaymentStyle#getPaymentDelay(int)
	 */
	public double getPaymentDelay(int days) {
		if ( days > 0) 
			return Price.BASIC_PRICE.getPrice() * days;
		else	
			return 0;
		}

}
